vCloud Director API

By activating the vCloud Director API you can automate all tasks which you are able to use through the vCloud Director GUI, e.g. by using PowerShell. Please note that you cannot modify your DDCs resources nor create new DDCs. Moving VMs between your existing infrastructure and DCS isn’t possible with the API exposure.

For further information on how to work with the vCloud Director API, please refer to http://pubs.vmware.com/vcd-56/topic/com.vmware.ICbase/PDF/vcd_56_api_guide.pdf

Create vcd access 1) Create or manage the vCloud Director API access by clicking on vCloud Director API Create vcd access commit 2) Check the box next to I agree to the mentioned conditions in order to accept the terms and conditions.

3) Click on the Save button.

Create and manage API users

Create and manage API users 1) To create a new API user click on Create new API user

2) You can reset the password with the button and delete an API user by clicking on the button.

NOTE: In order to connect to your environment via the API, you need the user name, password and the vOrg name. Using the wrong password will block the user for 10 minutes after 5 attempts.

Create vcd api user 3) Enter a username. IMPORTANT: The prefix apivcd is necessary.

4) Enter a password consisting of at least 16 characters (alphanumeric and special characters, DO NOT USE $"!!)

After submitting the order you will receive an e-mail notification when the user is created.

Access vCloud Director API

Use the following URL to work with the vCloud Director API: https://datacenter.swisscomcloud.com

Example using Power CLI: To connect to your Organisation open PowerCLI if installed, otherwise you need to download and install it first (please find link to download page here). Then enter the following Code: Connect-CIServer -Server “datacenter.swisscomcloud.com” -Org “YourOrgName” -User “YourUserName” -Password “YourPassword

vcd console api If you have been successfully connected you will see this screen. Now you can go on to explore your Organization via API Requests.

Example with RESTClient (Firefox Plugin): Select Method POST and enter the following URL: https://datacenter.swisscomcloud.com/api/sessions

Rest API POST Add a Basic Authentication Header with your credentials and a custom Header with the following values: Name = Accept, Value = application/*+xml;version=5.6

REST API commands If you could successfully connect, the following Response will appear:

REST API response

results matching ""

    No results matching ""